Skip to content

Fix Preview View Switcher to receive good currentView#8311

Open
charlesh88 wants to merge 1 commit intomasterfrom
fix-preview-view-switcher-8310
Open

Fix Preview View Switcher to receive good currentView#8311
charlesh88 wants to merge 1 commit intomasterfrom
fix-preview-view-switcher-8310

Conversation

@charlesh88
Copy link
Copy Markdown
Contributor

@charlesh88 charlesh88 commented Apr 24, 2026

Describe your changes:

Updated the currentView computed property to return the view provider object from the viewProviders array instead of the actual view instance. This matches what ViewSwitcher expects - an object with properties like cssClass and name rather than the view instance with methods like show and destroy.

The computed property now:

  • Finds the provider in viewProviders that matches the current viewKey
  • Returns that provider object (which has the expected structure)
  • Falls back to an empty object if no match is found
  • This aligns with how BrowseBar.vue handles the same situation.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

- Format and pass properly constructed current-view to ViewSwitcher, based on BrowseBar.vue.
@charlesh88 charlesh88 added the bug:regression It used to work. Now it doesn't :( label Apr 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 56.20%. Comparing base (e5120e9) to head (24d3a12).

Files with missing lines Patch % Lines
src/ui/preview/PreviewContainer.vue 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8311      +/-   ##
==========================================
- Coverage   57.21%   56.20%   -1.01%     
==========================================
  Files         728      728              
  Lines       29676    29677       +1     
  Branches     2804     2805       +1     
==========================================
- Hits        16978    16679     -299     
- Misses      12358    12658     +300     
  Partials      340      340              
Flag Coverage Δ
e2e-ci 61.47% <ø> (-2.96%) ⬇️
e2e-full 39.46% <ø> (-0.02%) ⬇️
unit 46.39% <50.00%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
src/ui/preview/PreviewContainer.vue 26.66% <50.00%> (-0.37%) ⬇️

... and 36 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5120e9...24d3a12. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug:regression It used to work. Now it doesn't :(

Projects

None yet

Development

Successfully merging this pull request may close these issues.

View Switcher doesn't populate label in Preview container

1 participant